home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disc 3
/
Commodore_Disc_03_19xx_-_de.d64
/
textprogramm 64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
8KB
|
233 lines
10 rem textverarbeitungsprogramm 64
20 rem (p) commodore welt =
30 rem ============================
40 rem (c) by peter basch 7.0 =
50 rem (v) by bernd welte 2.0 =
60 rem =
70 rem version 2.0 40 z/ascii =
80 rem commodore 64 + 1541 =
90 rem ============================
100 printchr$(014):p$=chr$(046):open1,4,2:open3,4,1:open4,4,7
110 dimz$(660),e$(61):cl$=chr$(147):cd$=chr$(017):rn$=chr$(018):rf$=chr$(146):rq$=chr$(145):rb$=chr$(157):sp$=chr$(032):ec$=chr$(027):in$=chr$(027)+chr$(064)
120 poke650,128
130 printcl$rn$" [208]eter's [212]ext fuer den [195]64'er ";
140 printrn$" < _ > zum [205]enue < * > [204]eerzeile "rf$;
150 print" mit [194]riefkopf = <[194]> "
160 print"mit [193]bsenderzeile = <[193]>"
170 print" oder [206]eutral = <[206]>":print#1,in$;
180 gety$:ify$=""then180
190 ify$="n"then720
200 ify$="b"then350
210 ify$="a"then330
220 goto 180
230 y$="b"
240 print"[211]chrift ? < [208] > [208]ica < [201] > [201]talic"
250 print" < [203] > [203]ompr. < [211] > [211]choen"
260 getb$:ifb$=""then260
270 ify$="b"andb$="k"thenprint"[203]eine komprimierte [211]chrift moeglich":goto260
280 ifb$="p" then return
290 ifb$="k" thenprint#1,ec$;chr$(15);:return
300 ifb$="i" thenprint#1,ec$;chr$(52);:return
310 ifb$="s" thenprint#1,ec$;chr$(88);chr$(1);:return
320 goto260
330 gosub240
340 print#1,spc(8)"[208]eter [194]asch":print#1,spc(8)"[198]aerberstr. 27";
345 print#1,spc(8)"8998 lindenberg":print#1,spc(8)"tel. 0838176573"
346 for i=1to4:print#1:nexti:goto730
350 print:printrn$" [193]dressen eingabe ":print
360 input" [193]nrede ";a$
370 input" [212]itel ";k$
380 input" [206]ame ";n$
390 input" [211]trasse ";c$
400 input" [208][204][218] [207]rt ";d$
410 input" [201]hr [196]atum ";e$
420 ife$=""thene$=" "
430 input" uns. [218]eichen ";f$
440 iff$=""thenf$=" "
450 input" [196]atum ";g$
460 input" [193]nrede ";h$
470 print#3,chr$(14)"========================================"
480 print#3,ec$;chr$(87);chr$(0);
490 print#3,ec$;chr$(80);
500 print#3,ec$;chr$(69);chr$(14)"peter basch dl1gbc"
510 print#3,ec$;chr$(70);
520 print#3,ec$;chr$(20)"faerberstr. 27";
530 print#3,ec$;chr$(15)spc(87)"amateurradiostation"
540 print#3,ec$;chr$(65);chr$(5)
550 print#3,ec$;chr$(45);chr$(1);
560 print#3,"8998 lindenberg"
570 print#3,ec$;chr$(45);chr$(0);
580 print#3,ec$;chr$(15);spc(111)"[207]rtsverband [204]indau/[194]":print#3
590 print#3,"tel. 08381/6573";
600 print#3,ec$;chr$(69)spc(57)"dok t 13"
610 print#3,ec$;chr$(70)
620 print#3,ec$;chr$(83);chr$(1);
630 print#3,"bank krspk 7988 wangen blz 65052020 ktnr. 938866":print#3
640 print#3,ec$;chr$(84);
650 print#3,chr$(18);chr$(14)"========================================":print# 3,in$
660 fori=1to2:print#3,"":print#3,ec$;chr$(74);chr$(i);:nexti:print#4,in$;
670 gosub230
680 print#4,spc(8)a$:print#4,spc(8)k$:print#4,spc(8)n$:print#4,spc(8)c$:print#4,spc(8)d$:fori=1to3:print#4:nexti
690 fori=1to80:print#1,chr$(45);:nexti
700 print#1,ec$;chr$(77);" [201]hr [211]chreiben vom: ";e$;" unser [218]eichen ";f$;" [196]atum :";g$
710 print#1:print#1:print#1:print#4,spc(8)h$:print#4,ec$;chr$(70):goto2020
720 gosub240
730 goto 2020
740 printchr$(175)+rb$;
750 gett$:ift$=""then750
760 t=asc(t$):ift=20andw=1andz<=1andlen(tt$)=0thent$="":printcl$;:z=1:goto740
770 ifw=2andt=20andlen(tt$)=0thent$="":goto750
780 ift>13andt<20ort>20andt<32ort>128andt<133ort>144andt<160thent$="":goto750
790 ift=95thenreturn
800 ift=42thentt=66:z$(z)=tt$:z=z+1:tt$="":print"[218]eile "z-1:goto740
810 ift=13then740
820 ift=34thent$="'"
830 ift<>20andlen(t$)=1thenprintt$;
840 ift<>20goto940
850 iflen(tt$)=1then880
860 ifw=1then870
870 tt$=left$(tt$,len(tt$)-1):printchr$(20);:goto740
880 l=l-len(tt$):tt$="":printsp$rb$chr$(20);:ifw=1thenz$(z)="":z=z-1:ifz=0thenz=1
890 ifw=1thentt$=z$(z)
900 ifw=0thene=e-1:ife=0thene=1
910 ifw=0thentt$=e$(e)
920 ifw=2thentt$="":goto750
930 return
940 iflen(t$)>1then1000
950 ifq=0andlen(tt$)>u-3andt$=" "then990
960 tt$=tt$+t$
970 iflen(tt$)>54thengosub2180
980 iflen(tt$)<u+2then740
990 goto930
1000 xl=len(t$):fors=1toxl:tr$=mid$(t$,s,1):tt$=tt$+tr$:printtr$;:lk=len(tt$)
1010 iflk>u+1thent$="":goto950
1020 next:t$="":goto950
1030 w=1:print:printcl$"[215]eiterschreiben ";rn$" (1) "rf$
1040 print"[206]euen [212]ext eing.";rn$" (2) "rf$
1050 getx$:x=val(x$):ifx<1orx>2then1050
1060 onxgoto1070,1190
1070 printcl$rq$;
1080 fori=1to66:printrn$p$;:next:print"<[218]eilenende"
1090 z$(z)=tt$:z=z+1:tt$="":gosub740
1100 ift$=chr$(95)thenz$(z)=tt$:tt$="":t$="":w=0:return
1110 goto1090
1120 printcl$rq$;
1130 fori=1to66:printrn$p$;:next:print"<[218]eilenende"
1140 forx=1toz:z$(z)="":z=1:gosub740
1150 ift$=chr$(95)thenz$(z)=tt$:tt$="":t$="":w=0:return
1160 z$(z)=tt$:z=z+1:tt$="":print" [218]eile ";z-1:gosub740
1170 ift$=chr$(95)thenz$(z)=tt$:tt$="":t$="":w=0:return
1180 goto1160
1190 u=64:goto1120
1200 a=1:b=8
1210 printcl$:c=b-a:forx=atob:printrn$;x;rb$" "rf$;tab(6);z$(x):next:printcd$
1220 poke781,21:poke782,0:poke783,0:sys65520
1230 printrn$" (l) [204]oeschen (e) [197]infuegen ";
1240 print" (+ - ) [194]laettern (b) [194]locktausch ";
1250 print" (_) [197]nde ";
1260 getk$:ifk$=""then1260
1270 ifk$="l"then1360
1280 ifk$="e"then1390
1290 ifk$="b"then1520
1300 ifk$="-"thena=a-1-c:b=a+c:ifa<1thena=1:b=a+c
1310 ifk$="-"then1210
1320 ifk$="+"thena=b+1:b=b+1+c:ifb+1+c>660thenb=660:a=b-c
1330 ifk$="+"then1210
1340 ifk$=chr$(95)thena=0:b=0:return
1350 goto1210
1360 printcd$"[215]elche [218]eile soll geloescht werden? 0=[201]rrtum ";:input" [218]eilen-[206]r. ";kk:ifkk=0then1210
1370 ifkk>zthenprintrq$rq$rq$rq$rq$rq$rq$:goto1360
1380 forx=kktoz:z$(x)=z$(x+1):next:z$(z)="":z=z-1:kk=0:goto1210
1390 printcd$"[214]or welcher [218]eile soll eingefuegt werden? (0=[218]urueck) ";:input" [218]eilen-[206]r. ";kk:ifkk>zthenprintrq$rq$:goto1390
1400 ifkk=0then1210
1410 w=0:e=0:printcl$"[197]s koennen maximal 60 [218]eichen eingefuegt werden!"
1420 forx=1to660:next:printcl$:e=1:ifz+1>=660then1210
1430 gosub740:ift$=chr$(95)thene$(e)=tt$:tt$="":t$="":goto1490
1440 e$(e)=tt$:tt$="":t$="":e=e+1:ife=61then1490
1450 ifz+e=660goto1490
1460 gosub740
1470 ift$=chr$(95)thene$(e)=tt$:tt$="":t$="":goto1490
1480 goto1440
1490 z=z+e:forx=ztokk+e-1step-1:z$(x)=z$(x-e):next
1500 f=0:forx=kktokk+e-1:f=f+1:z$(x)=e$(f):e$(f)="":next:kk=0:e=1
1510 goto1210
1520 printcd$"[214]on welcher [218]eile ";:input"[218]eilen-[206]r. ";aa$:ifaa$=chr$(95)then1210
1530 aa=val(aa$):ifaa<1orab>zthenprintrq$rq$:goto1520
1540 print"bis zu welcher [218]eile ";:input"[218]eilen-[206]r. ";bb:ifbb<aaorbb>zthenprintrq$rq$:goto1540
1550 print"[214]or welcher [218]eile soll eingefuegt werden ?";:input"[218]eilen-[206]r. ";cc:ifcc<1orcc>zthenprintrq$rq$:goto1550
1560 dd=bb+1-aa:ifdd>60thenprint"[194]lock zu gross":goto1210
1570 e=0:e$="":ford=aatobb:e=e+1:e$(e)=z$(d):next
1580 z=z+dd+1:ford=ztocc+dd-1step-1:z$(d)=z$(d-dd):next:d=0:e=0
1590 ford=cctocc+dd-1:e=e+1:z$(d)=e$(e):next:x=0
1600 print"[194]lock 1 loeschen ";rn$" j/n ? "
1610 getx$:ifx$=""then1610
1620 ifx$="j"then1650
1630 ifx$="n"then1210
1640 goto1610
1650 forx=aatoz:z$(x)=z$(x+dd):next:z=z-dd:goto1200
1660 printcl$rn$" [193]usdruck "
1670 gosub1780
1680 xx=0
1690 forx=atob:print#1,chr$(9);:gosub1760:ma=ma+1:ifma/t=int(ma/t)thenxx=xx+1
1700 next
1710 print"[206]och ein [196]ruck? (j/n) ":printrq$rq$:xx=0:ma=0
1720 gety$:ify$=""then1720
1730 ify$="j"thenprintrq$rq$:ma=0:goto1670
1740 ify$="n"thenx$="":y$="":q=0:return
1750 goto1720
1760 forzz=1tolen(z$(x)):ip$=mid$(z$(x),zz,1)
1770 print#4,ip$;:nextzz:print#4:return
1780 t=60:p=8:a$="0"
1790 a$="0":a=val(a$):ifa=0thena=1:b=z:goto1810
1800 ifa<0ora>zthenprintrq$rq$rq$:goto1790
1810 return
1820 printcl$:open15,8,15
1830 print#15,"i0":gosub1950:input"[196]ateiname:";cb$:db$="0:"+cb$+",s,w"
1840 goto1970
1850 open2,8,2,db$:print"[196]atei ";rn$ cb$ rf$;" wird gespeichert."
1860 print#2,z:print#2,u:forx=1toz:ifz$(x)=""thenz$(x)=chr$(95)
1870 print#2,chr$(34);z$(x):ifz$(x)=chr$(95)thenz$(x)=""
1880 next:close2:close15:return
1890 printcl$:open15,8,15:print#15,"i0"
1900 gosub1950:input"[196]ateiname: ";cb$:db$="0:"+cb$+",s,r"
1910 gosub1950:close2:open2,8,2,db$:gosub1950:printcd$"[196]atei ";rn$cb$rf$;" wird eingelesen."
1920 input#2,z:input#2,u:forx=1toz
1930 input#2,z$(x):ifz$(x)=chr$(95)thenz$(x)=""
1940 next:close2:close15:return
1950 input#15,v$,w$,x$,y$:ifval(v$)<>0thenprintv$,w$,x$,y$
1960 return
1970 open2,8,2,db$:gosub1950:ifval(v$)<>63thenclose2:print#15,"s0:"+cb$:goto1850
1980 ifval(v$)=63thenprint"[196]atei ueberschreiben ";rn$" j/n ? "
1990 getz$:ifz$=""then1990
2000 ifz$="n"thenclose2:close15:goto1820
2010 ifz$="j"thenclose2:print#15,"s0:"+cb$:gosub1950:goto1850
2020 x$="":x=0:q=0:w=0:printcl$chr$(14)
2030 printcd$cd$spc(14)rn$" [205] e n u e ":print
2040 printspc(8)rn$"-1-";rf$" [212]ext eingeben":print
2050 printspc(8)rn$"-2-";rf$" [212]ext korrigieren":print
2060 printspc(8)rn$"-3-";rf$" [212]ext drucken":print
2070 printspc(8)rn$"-4-";rf$" [212]ext speichern":print
2080 printspc(8)rn$"-5-";rf$" [212]ext einlesen":print
2090 printspc(8)rn$"-6-";rf$" [208]rogrammende":print
2100 printspc(8)rn$"-7-";rf$" [218]urueck":print
2110 printspc(8)"[215]aehlen [211]ie ";rn$" 1-7 ":print
2120 print:printspc(5)"[198]reier [211]peicher =";:printfre(0)"[194]ytes"
2130 getx$:x=val(x$):ifx<1orx>7then2130
2140 ifx=6thenprintchr$(19);chr$(19);cl$:close1:close3:close4:end
2150 ifx=7 goto 130
2160 onxgosub1030,1200,1660,1820,1890
2170 goto2020
2180 si=54272:fl=si:fh=si+1:w=si+4:a=si+5:h=si+6:l=si+24
2190 pokel,15:pokea,16+9:pokeh,4*16+4:pokefh,29:pokefl,69
2200 pokew,17:fort=1to100:next
2210 pokew,0:pokea,0:pokeh,0
2220 return
2230 rem textprogramm ========= c64
2240 rem 038911 bytes memory ===
2250 rem 007548 bytes program ===
2260 rem 000112 bytes variables ===
2270 rem 002183 bytes arrays ===
2280 rem 000040 bytes strings ===
2290 rem 029028 bytes free (0) ===
2300 rem ==========================